<include file="Public/head" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/css/jquery.treetable.css" />
<link type="text/css" rel="stylesheet" href="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/css/jquery.treetable.theme.default.css" />
<script src="{:get_style_cdnurl()}paimai/yunying/plugin/jquery-treetable/jquery.treetable.js" type="text/javascript"></script>
</head>
<body>
<include file="Public/common_header" />
<div class="mian">
    <include file="Public/sidebar" menu='clcwht.zxgl' />
    <div class="mianR">
        <div class="listBox">
            <div class="yuList">
                <div class="yuSuo">
                    <input id="list_order" onclick="window.location.href='/Article/editCategory';" type="button" value="添加分类" class="suoSou" />
                </div>
                <br/>
                <table class="table table-bordered" id="menus-table">
                    <thead>
                    <tr>
                        <th width="100">ID</th>
                        <th>菜单名称</th>
                        <th width="100">状态</th>
                        <th width="180">操作</th>
                    </tr>
                    </thead>
                    <tbody>
                    	<volist name="category" id="vo" key="k">
                   		<tr data-tt-id='{$k}' >
		                    <td>{$vo.category_id}</td>
		                    <td>{$vo.category_title}</td>
		                    <td><if condition="$vo['status'] eq 1">正常<else/>删除</if></td>
		                    <td><a href='/Article/editCategory/id/{$vo.category_id}'>编辑</a> | <a href='javascript:;'>删除</a> | <a href='/Article/editCategory/parent_id/{$vo.category_id}'>添加子菜单</a></td>
	                	</tr>
	                	<volist name="vo.child" id="vs" key="ks">
	                	<tr data-tt-id='{$k}-{$ks}'  data-tt-parent-id="{$k}">
		                    <td>{$vs.category_id}</td>
		                    <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;└─ {$vs.category_title}</td>
		                    <td><if condition="$vs['status'] eq 1">正常<else/>删除</if></td>
		                    <td><a href='/Article/editCategory/id/{$vs.category_id}'>编辑</a> | <a href='javascript:;'>删除</a></td>
		                </tr>
	                	</volist>
                    	</volist>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<script >
    $(document).ready(function() {
        $("#menus-table").treetable({
            expandable: true
        });
    });

</script>
<include file="Public/foot" />